package com.dempsey.api;

import com.dempsey.api.factory.RemoteGoodFallbackFactory;
import com.dempsey.common.core.domain.AjaxResult;
import com.dempsey.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 用户服务
 *
 * @author Dempsey
 */
@FeignClient(name = "good-server", fallbackFactory = RemoteGoodFallbackFactory.class)
public interface RemoteGoodService {


    @PostMapping("/good/getStock")
    R<Integer> getStock(@RequestParam("goodId") int goodId);

    @PostMapping("/good/delStock")
    AjaxResult delStock(@RequestParam("goodId") int goodId);


}
